﻿using System;

namespace N2.Workflow.Items
{
	/// <summary>
	/// A piece of information to be attached to a Content Item on
	/// every Workflow State change.
	/// </summary>
	public interface IItemState
	{
		/// <summary>
		/// Content Item, which state to represent.
		/// Should never be null.
		/// </summary>
		ContentItem EnclosingItem { get; }
		
		/// <summary>
		/// A reference to a Workflow State Definition,
		/// to which the current state corresponds.
		/// Should never be null.
		/// </summary>
		IStateDefinition Definition { get; }
		
		/// <summary>
		/// A reference to a Workflow Action Definition,
		/// by which the current state was reached.
		/// Should never be null.
		/// </summary>
		IActionDefinition Action { get; }
		
		/// <summary>
		/// A link to a previous state.
		/// May be null on initial state.
		/// </summary>
		IItemState PreviousState { get; }

		string AssignedTo { get; }

		string Comment { get; }

		DateTime Created { get; }

		string SavedBy { get; }
	}
}
